package com.currency.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.currency.exception.AppException;
import com.currency.pojo.WytCoinsTradeResumePojo;
import com.currency.request.NewTradeRequest;
import com.currency.request.UserIdNormalRequest;
import com.currency.request.WithdrawalOilCardRequest;
import com.currency.response.BaseResponse;
import com.currency.response.NewTradeResponse;
import com.currency.response.NormalResponse;
import com.currency.response.QueryTradeResponse;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;

public interface TradeService {
    NewTradeResponse newTrade(@RequestBody @Validated NewTradeRequest request) throws Exception;


    QueryTradeResponse queryTrade(String tradeId, Integer flag) throws Exception;


    BaseResponse cancelTrade(String tradeId) throws Exception;


    NormalResponse queryHistory(String userId);


    NormalResponse queryPayStatus(String userId, int status);


    BaseResponse withdrawalOilCard(@RequestBody WithdrawalOilCardRequest request) throws AppException;


    NormalResponse<Page<WytCoinsTradeResumePojo>> queryTradeResume(@RequestBody UserIdNormalRequest request);
}
